package com.ada.service.impl;

import com.ada.service.HelloService2;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

@Service
public class HelloService2Impl implements HelloService2 {
    @Override
    public String sayHello(String name) {
        String fromIp =(String) RpcContext.getContext().getAttachment("ip");
        System.out.println("收到请求Ip:"+fromIp);
        return "provider2 hello " + name;
    }
}
